<div id="content">
<h1><?php echo $this->pageTitle; ?></h1>
	<div id="normaltable">
		<table>
			<thead>
				<tr>
					<th>Status</th>
					<th>Customer</th>
					<th>Reference</th>
					<th>RMA reason</th>
					<th>Created On</th>
					<th>Outlet</th>
					<th>Quantity</th>
					<th>Value</th>
					<th></th>
					<th></th>
				</tr>
			</thead>
			<tbody>
			<?php 
				foreach($this->rmaList as $row)
				{
					echo "<tr>";
					echo "<td>".$row['status']."</td>";
					echo "<td>".$row['customerName']."</td>";
					echo "<td>".$row['reference']."</td>";
					echo "<td>".$row['rmaReason']."</td>";
					echo "<td>".$row['createdOn']."</td>";
					echo "<td>".$row['sapCode']." - ".$row['outletName']."</td>";
					echo "<td>".$row['quantity']."</td>";
					echo "<td></td>";
					echo "<td>";
					if($row['status'] == 'entered')
					{
						echo "<a href=".$this->url(array(
										'id' => $row['id'],
										'controller' => 'rma',
										'action'     => 'edititems')).">EDIT<a>";
					}
					echo "</td>";
					echo "<td></td>";
					
					echo "</tr>";
				}
			?>
			</tbody>
		</table>
	</div>
</div>